<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <link rel="stylesheet" th:href="@{/static/layui/js/css/layui.css}">
    <script th:src="@{/static/layui/js/layui.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/vue/vue.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/vue/axios.min.js}" charset="UTF-8" type="text/javascript"></script>
    <script th:src="@{/static/jquery/jquery.js}" charset="UTF-8" type="text/javascript"></script>
    <style>
        .layui-bold{
            font-weight: bold;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-green">
        <div class="layui-logo layui-hide-xs  layui-bg-green layui-bold">个人中心</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-bg-green layui-layout-right" style="height: 59px">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img" id="userPortrait">
                    我

                    <script th:inline="javascript">
                        let bufferedPortrait = [[${stp.getSession().getString('userPortraitCode')}]]
                        if(bufferedPortrait !== ''){
                            $('#userPortrait').attr('src',"data:image/png;base64,"+bufferedPortrait)
                        }else{
                            $('#userPortrait').attr('src',"//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg")
                        }

                    </script>
                </a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/community/personal}">个人中心</a></dd>
                    <dd><a href="" class="logout">退出登录</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-green">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-bg-green layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-bg-green layui-nav-itemed">
                    <a class="layui-nav-itemed" >个人信息</a>
                    <dl class="layui-nav-child">
                        <dd><a style="margin-left: 20px;width: 80%;" th:href="@{/community/personal}">个人资料</a></dd>
                        <dd>
                            <a   style="margin-left: 20px;width: 80%;" th:href="@{/community/personal/security}">
                                <span style="color: white">账号安全</span>
                                <span class="layui-icon">&#xe715;</span>
                            </a>


                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a th:href="@{'/community/personal/space/'+${stp.getLoginId()}}">个人空间</a></li>
                <li class="layui-nav-item"><a th:href="@{/community/personal/private_spaces}">私人空间</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div class="layui-row">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>修改密码</legend>
            </fieldset>

            <div class="layui-row" style="margin-left: 20px">
                <form class="layui-form layui-form-pane">
                    <div class="layui-form-item">
                        <label class="layui-form-label">新密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">确认密码</label>
                        <div class="layui-input-inline">
                            <input type="password" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <button class="layui-btn" lay-submit="" lay-filter="demo2">确认修改</button>
                    </div>

                </form>
            </div>

        </div>





    </div>

</div>

<script th:src="@{/static/personal-main.js}"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });
</script>

<!--负责执行退出登录的脚本-->
<form th:action="@{/logout}" class="logout-url"></form>
<form th:action="@{/login}" class="login-page"></form>
<script th:src="@{/static/logout.js}"></script>


</body>
</html>
